Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kern.features.cheri_purecap_kernel #2229

Merged
merged 2 commits into from
Jan 25, 2025
Merged

Conversation

brooksdavis
Copy link
Member

Rename misleading kern.features.cheriabi_kernel to kern.features.cheri_purecap_kernel and make clear that it's a pure-capaiblity kernel (not CheriABI which refers to userspace).

@brooksdavis
Copy link
Member Author

Nothing in tree uses the old feature flag so I think it's safe to drop. Could keep it for a release instead, but we'd then need to remember to remove it.

Copy link
Member

@kwitaszczyk kwitaszczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth renaming other features to match kernel config options and indicate that they refer to CHERI/Morello:

  • kern.features.subobject_bounds to kern.features.cheri_subobject_bounds
  • kern.features.cheri_revoke to kern.features.cheri_caprevoke
  • kern.features.benchmark_abi_kernel to kern.features.morello_benchmarkabi_kernel.

That would be useful when listing features with sysctl kern.features | grep 'cheri\|morello'.

@jrtc27
Copy link
Member

jrtc27 commented Oct 16, 2024

kern.features.morello_benchmarkabi_kernel

This doesn't say purecap in it. Given we have cheri_purecap_kernel, probably morello_purecap_benchmark_kernel is the best thing (with a possible _abi in there too if you want).

@jrtc27
Copy link
Member

jrtc27 commented Oct 16, 2024

kern.features.cheri_caprevoke

This one is queried by bits of userspace, so an upgraded kernel would break them.

@jrtc27
Copy link
Member

jrtc27 commented Oct 16, 2024

kern.features.cheri_subobject_bounds

This should say kernel in it too for the feature name?

@brooksdavis brooksdavis force-pushed the features.cheri_purecap_kernel branch from 21c47d0 to 0203c36 Compare December 4, 2024 01:46
@brooksdavis
Copy link
Member Author

kern.features.cheri_caprevoke

This one is queried by bits of userspace, so an upgraded kernel would break them.

This would be mostly harmless and transient if we fixed userspace. It's used to suppress some warnings in libprocstat when the feature is missing and as well as skip some cheribsdtest tests so there would be a modest incompatibility between mismatched kernel and userspace but not critical breakage.

@brooksdavis
Copy link
Member Author

I've left kern.features.cheri_revoke alone for now, but I think we should land the other changes.

@brooksdavis brooksdavis added the ready-to-land PR is ready to land after revisions label Jan 24, 2025
Rename misleading kern.features.cheriabi_kernel to
kern.features.cheri_purecap_kernel and make clear that it's a
pure-capability kernel (not CheriABI which refers to userspace).
subobject_bounds -> cheri_subobject_bounds_kernel
benchmark_abi_kernel -> morello_purecap_benchmark_abi_kernel

Make it clear that these are kernel things and that subobject bounds is
related to CHERI.
@bsdjhb bsdjhb force-pushed the features.cheri_purecap_kernel branch from 0203c36 to 1964c0b Compare January 25, 2025 15:46
@bsdjhb bsdjhb merged commit 719138d into dev Jan 25, 2025
7 of 8 checks passed
@bsdjhb bsdjhb deleted the features.cheri_purecap_kernel branch January 25, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-land PR is ready to land after revisions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants